//
//  HNUserCell.m
//  HappyNews
//
//  Created by baiping on 16/1/13.
//  Copyright © 2016年 BPWBANP. All rights reserved.
//

#import "HNUserCell.h"

#define kmagin 10


@implementation HNUserCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
    
     // 添加子控件
    [self addSubviews];
       
        
    }
    
    return self;
    
}

// 添加cell上的子控件
- (void)addSubviews{
    
    _icon = [[UIImageView alloc]init];
    
    _contentLabel = [[UILabel alloc]init];
    
    _unfoldImage = [[UIImageView alloc]init];
    
    [self.contentView addSubview:_unfoldImage];
    
    [self.contentView addSubview:_contentLabel];
    
    [self.contentView addSubview:_icon];
    
    _contentLabel.font = [UIFont systemFontOfSize:14];
    
    _unfoldImage.image = [UIImage imageNamed:@"Dark_Menu_Enter"];
    
  //  _unfoldImage.backgroundColor = [UIColor redColor];
}


- (void)layoutSubviews{
    
    _icon.frame = CGRectMake(kmagin, kmagin, 28, 28);
    
    _contentLabel.frame = CGRectMake(_icon.right + kmagin * 2, _icon.top, 100, 28);
    
    _unfoldImage.frame = CGRectMake(kScreenWidth - 30, _contentLabel.top + 10, 14, 14);
    
  
}







@end
